package top.haijunit.work.modules.access.domain;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import top.haijunit.work.core.doamin.ValidChecks;

/**
 * 【角色分配】
 *
 * @author zhanghaijun
 * @since 2024-08-20
 */
@Data
@Schema(description = "角色分配")
public class AssignRole {

    @Schema(description = "唯一编码")
    @NotNull(message = "唯一编码不能为空", groups = ValidChecks.GroupEdit.class)
    private Long uniqCode;

    @Schema(description = "主体类型")
    @NotNull(message = "主体类型不能为空")
    private Integer subjectType;
    @Schema(description = "主体编码")
    @NotNull(message = "主体编码不能为空")
    private Long subjectCode;
    @Schema(description = "主体名称")
    private String subjectName;

    @Schema(description = "角色编码")
    @NotNull(message = "角色编码不能为空")
    private Long roleCode;
    @Schema(description = "角色名称")
    private String roleName;

    @Schema(description = "资源编码")
    @NotBlank(message = "资源编码不能为空")
    private String resourceCode;
}
